package com.lagou;

import com.lagou.config.EnableMyRegisterServer;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

/** 标注在类上说明这个类是‘SpringBoot’的主配置类 */
@SpringBootApplication
/** 自定义的注解，用于演示自定义的starter中的热插拔技术 */
@EnableMyRegisterServer
public class SpringBootMytestApplication {

	public static void main(String[] args) {
		// 返回的是IOC容器，可以用ConfigurableApplicationContext接收
		ConfigurableApplicationContext context = SpringApplication.run(SpringBootMytestApplication.class, args);
		String[] names = context.getBeanDefinitionNames();
		System.out.println("容器中bean的个数：" + names.length);
	}

}
